import request from '@/utils/request'
// 获取部门列表
export const getDepartments = () => request.get('/company/department')
// 获取部门负责人
export const getManagerList = () => request.get('/sys/user/simple')
// 新增部门
export const addDept = data => request.post('/company/department', data)
// 获取部门详情
export const getDepDetail = (id) => request.get(`/company/department/${id}`)
// 编辑部门
export function editDept(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}
// 删除部门
export const delDept = id => request.delete(`/company/department/${id}`)
